[C] this code, its work fine and return what i want, but its hang before print it ??

Posted by Rami Jarrar on Stack Overflow See other posts from Stack Overflow or by Rami Jarrar
Published on 2010-03-27T17:19:16Z Indexed on 2010/03/27 17:23 UTC
Read the original article Hit count: 270

Filed under:
|
|
|

I make this program ::

#include<stdio.h>

char *raw_input(char *msg);

main() {
char *s;
*s = *raw_input("Message Here Is: ");
printf("Return Done..");
printf(s);
}

char *raw_input(char *msg){
char *d;
    printf("%s", msg);
    scanf("%s",&d);
return d;
}

What this do is, it print my message and scan for input from the user, then print it,, but whats the problem in print the input from the user ???

© Stack Overflow or respective owner

Related posts about c

    Related posts about function